package com.wzh.forxu.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wzh.forxu.R;
import com.wzh.forxu.model.ConsumeDetail;

import java.util.List;

/**
 * @Author Hu
 * @Time 2017/4/21 --17:51.
 * @Email 87683202@qq.com
 */
public class ConsumeAdapter extends BaseQuickAdapter<ConsumeDetail,BaseViewHolder> {
    public ConsumeAdapter(int layoutResId, List<ConsumeDetail> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ConsumeDetail item) {
        helper
                .setText(R.id.con_type,item.getConsumeId()==1?"餐饮":item.getConsumeId()==2?"购物":item.getConsumeId()==3?"交通":
                "娱乐")
                .setText(R.id.con_time,item.getConsumeTime().toString()) .setText(R.id.con_money,item.getConsumeMoney());
    }
}
